﻿using UnityEngine;
using System.Collections;

public class AutoPrintSpeed : MonoBehaviour {

	[HideInInspector]
	public float printSpeed;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {

	}

	void Activate(){
		StartCoroutine (AutoDialogue (printSpeed));
	}

	IEnumerator AutoDialogue(float speed){
		StopCoroutine (AutoDialogue(printSpeed));
		Dialoguer.ContinueDialogue ();
		yield return new WaitForSeconds(speed);
		StartCoroutine (AutoDialogue (printSpeed));
	}
}
